{extend name="./theme/backend/base.html"}
{block name="content"}
<style type="text/css">
select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input{vertical-align: top;}
</style>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('mall/CashOut/index')}">资金明细</a></li>
    </ul>
    <form class="well form-search" method="get" action="">
		ID/用户名：
		<input type="text" name="user" style="width: 200px;" value="{$search.user|default=''}" placeholder="ID/用户名">&nbsp;&nbsp;
		时间段：
		<input type="text" name="start_time" class="js-datetime date" value="{$search.start_time|default=''}" style="width: 120px;" autocomplete="off">-
		<input type="text" class="js-datetime date" name="end_time" value="{$search.end_time|default=''}" style="width: 120px;" autocomplete="off"> &nbsp; &nbsp;
		订单号： 
		<input type="text" name="order_sn" style="width: 200px;" value="{$search.order_sn|default=''}" placeholder="订单号">
		<input type="submit" class="btn btn-primary" value="搜索">
	</form>
    <form method="post" class="js-ajax-form" action="term/listorders">
        <table class="table table-hover table-bordered">
            <thead>
                <tr>
                    <th width="50">编号</th>
                    <th>用户信息</th>
                    <th>金额/冻结金额</th>
                    <th>积分</th>
                    <th>描述</th>
                    <th>订单号</th>
                    <th>变动时间</th>
                </tr>
            </thead>
            <tbody>
                {empty name="list"}
                <tr><td colspan="7">没有数据</td></tr>
                {else/}
                {foreach name="list" item="vo"}
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.user_id}/{$vo.username}</td>
                    <td>
                        {if condition="$vo.money gt 0"} 
                        {$vo.money}
                        {else/}
                        {$vo.frozen_money}
                        {/if}
                    </td>
                    <td>{$vo.integral}</td>
                    <td>{$vo.desc}</td>
                    <td>{$vo.order_sn}</td>
                    <td>
                        {$vo.change_time|date="Y-m-d H:i:s",###}
                    </td>
                </tr>
                {/foreach}
                {/empty}
            </tbody>
        </table>
        {notempty name="list"}
            <div class="pagination text-center">{$list->render()}</div>
        {/notempty}
    </form>
</div>
<script src="{$admin_assets_path}/js/common.js"></script>
{/block}